﻿using ReflectionStudio.Core.Events;
using System;
using System.ComponentModel;
using System.Data;
using System.Windows;
using WPFExcelReport.Helpers;
namespace WPFExcelReport
{
    public partial class TYCTYP
    {
        /// <summary>
        /// D: 9000米克数K， 1KM= K/9
        /// Tex: K*1
        /// NM：1000/K
        /// NE:(0.4536*1000*1000/840*0.9144)/K,若K=32s
        /// NE=493.776/K
        /// 
        ///
        /// </summary>
       
        public TYCTYP()
        {
            if (DesignerProperties.GetIsInDesignMode(this))
                return;
            MV = new VSDDAT();
            this.DataContext = MV;
            SDSA = "0012";
            DEFTXT = new System.Collections.Generic.List<string>();
            DEFTXT.Add("000000000000000000000000000000000000000000000000000000000000000000000000");
            InitializeComponent();
        }
        public override void DeleteCommand(object sender, RoutedEventArgs e)
        {
            base.DeleteCommand(sender, e);
        }
        public override void SaveCommand(object sender, RoutedEventArgs e)
        {
            base.SaveCommand(sender, e);
        }
        public override void QueryCommand(object sender, System.Windows.RoutedEventArgs e)
        {
            if (SDSA == null)
                return;
            if (SDSA.Trim() == "")
                return;
            ((VSDDAT)MV).SetUp(SDSA);
            dwData = TBMain.NewRow();
            dwData["SDSA"] = SDSA;
            dwData["SDKEY"] = " AND SDKEY LIKE '%" + LANG + "'";
            SResult = ((VSDDAT)MV).QuerySDDAT(dwData, System.Convert.ToInt32(SDSA));
            MergeData(SResult);
            base.QueryCommand(sender, e);
        }

    }
}
